import {BackComponent} from './back.component';
import {LoginComponent} from './login/login.component'; //登陆
import {DashboardComponent} from './dashboard/dashboard.component'; //后台首页
import { ArticleComponent } from './article/article.component'; // 文章列表
import { EditArticleComponent } from './edit-article/edit-article.component'; // 编辑文章

const urlPre = 'management';
export const backRoutes = [
    {
      path: 'login',
      component: LoginComponent
    },
    {
      path: 'dashboard',
      component: BackComponent,
      children: [
          {path: 'index', component: DashboardComponent}, // 仪表盘
          {path: 'article', component: ArticleComponent}, // 文章列表
          {path: 'edit-article', component: EditArticleComponent}, // 编辑文章
          {path: '**', redirectTo: `index`, pathMatch: 'full'}
      ]
    },
    {path: '**', redirectTo: `login`, pathMatch: 'full'}
    ];
